/*
 * @name: **列表
 * @content: 
 * @Author: joyce
 * @Date: 2020-08-09 20:37:31
 */
var mongoose = require("mongoose");

//用户登陆表(user_login)

var user_loginSchema = new mongoose.Schema({
  studus:{
    type: String,
    required: true,
    default: "可用"
  },// 账号状态 可用 已删除
  name: {
    type: String,
    required: true
  }, //用户名
  openid: {
    type: String
  }, //微信openid
  password: {
    type: String,
    required: true
  }, //密码
  Gender: {
    type: String
  }, //性别
  phone: {
    type: String,
    required: true
  }, //手机号
  position: {
    type: String,
    required: true
  }, //职位
  department: {
    type: mongoose.SchemaTypes.ObjectId,
    ref: "departmentlabel",
    required: true
  }, //部门
  registration_time: {
    type: Date,
    default: new Date()
  }, //注册时间
  head_portrait: {
    type: String,
    default: "avatar.png"
  }, //头像
  types: {
    type: Number,
    default: 0
  }, //用户类型 0普通用户
  audit: {
    type: Boolean,
    default: false
  }, //是否审核
  autograph: {
    type: String,
    default: "ta 比较懒还没有说明"
  }, //个性签名
  integral: {
    type: String,
    default: 10
  } //积分
});

module.exports = mongoose.model("user_login", user_loginSchema);
